<template>
<el-form :inline="true" :model="formInline" class="demo-form-inline">
    <el-form-item label="名称">
      <el-input v-model="data.supplier" placeholder="名称" clearable />
    </el-form-item>
    <el-form-item label="手机号码">
      <el-input v-model="data.telephone" placeholder="手机号码" clearable />
    </el-form-item>
    <el-form-item label="联系电话">
      <el-input v-model="data.phoneNum" placeholder="联系电话" clearable />
    </el-form-item>
    <el-form-item>
      <el-button type="primary" @click="onSubmit">查询</el-button>
      <el-button  >重置</el-button>
    </el-form-item>
  </el-form>
  <el-button type="primary" @click="add">新增</el-button>
  <el-button  >删除</el-button>
  <el-button  >启用</el-button>
  <el-button  >禁用</el-button>
  <el-button  >导入</el-button>
  <el-button  >导出</el-button>


<el-table :data="SupplierCustomerList" style="width: 100%" @selection-change="getall">
        <el-table-column type="selection" />
        <el-table-column prop="supplierCustomerId" label="#" width="180" />
        <el-table-column prop="traceabilityIamnges" label="操作" width="180">
            <template v-slot="scoped">
                <el-link type="primary" @click="upd(scoped.row.traceabilityId)">编辑</el-link>
                <el-link type="danger" @click="shan(scoped.row.traceabilityId)">删除</el-link>
            </template>
        </el-table-column>
        <el-table-column prop="supplier" label="名称" width="180" />
        <el-table-column prop="contacts" label="联系人" width="180" />
        <el-table-column prop="telephone" label="手机号码" width="180" />
        <el-table-column prop="phoneNum" label="联系电话" width="180" />
        <el-table-column prop="email" label="电子邮箱" width="180" />
        <el-table-column prop="beginNeedGet" label="期初应付" width="180" />
        <el-table-column prop="beginNeedPay" label="期末应付" width="180" />
        <el-table-column prop="taxRate" label="税率" width="180" />
        <el-table-column prop="sort" label="排序" width="180" />
        <el-table-column prop="enabled" label="状态" width="180" >
            <template v-slot="scoped">
                <el-text v-if="scoped.row.enabled == 1 " type="success" >启用</el-text>
                <el-text v-else="" type="danger" >禁用</el-text>
            </template>
        </el-table-column>
<!-- 
        <el-table-column prop="allNeedGet" label="信息完善度" width="180" />
        <el-table-column prop="allNeedPay" label="信息完善度" width="180" />
        <el-table-column prop="fax" label="信息完善度" width="180" />
        <el-table-column prop="telephone" label="信息完善度" width="180" />
        <el-table-column prop="address" label="信息完善度" width="180" />
        <el-table-column prop="taxNum" label="信息完善度" width="180" />
        <el-table-column prop="bankName" label="信息完善度" width="180" />
        <el-table-column prop="accountNumber" label="信息完善度" width="180" />
        <el-table-column prop="taxRate" label="信息完善度" width="180" />
        <el-table-column prop="sort" label="信息完善度" width="180" />
        <el-table-column prop="tenantId" label="信息完善度" width="180" />
        <el-table-column prop="deleteFlag" label="信息完善度" width="180" /> -->
       
    </el-table>
    
</template>

<script setup lang="js">
import { ref, reactive, onMounted } from 'vue'
import { ElMessage,ElMessageBox } from 'element-plus'
import { useRouter,useRoute } from 'vue-router'
import axios from 'axios'


const router=useRouter()
const route=useRoute()
const data=reactive({
    supplier:"",
    telephone:"",
    phoneNum:""
})

onMounted(()=>{
    getSupplierCustomerInfos()
})
const all=ref([])
const getall=(val)=>{
    all.value=val;
    getSupplierCustomerInfos();
}


const SupplierCustomerList=ref([])
const getSupplierCustomerInfos=()=>{
    axios.get("ERP/GetSupplierCustomerInfos").then(res=>{
        SupplierCustomerList.value=res.data
    })
}








</script>

<style scoped>

</style>